package io.lkt.modules.sys.dao;

import io.lkt.modules.sys.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 品牌信息表
 *
 * @author xss
 * @email dustwas@163.com
 * @date 2019-03-11 17:13:26
 */
@Mapper
public interface BBrandInfoDao extends BaseMapper<BBrandInfoEntity> {
	List<BBrandNameEntity> queryAll(Integer id);

	BBrandInfoEntity queryByName(@Param("brandName") String brandName);

	BBrandInfoEntity queryNameById(@Param("id") Integer id);

	BBrandInfoEntity queryTempByName(@Param("brandName") String brandName);

	Integer queryByAlias(@Param("brandName") String brandName);

	List<Integer> queryByNameLike(@Param("brandName") String brandName);

	int addBrandAndType(Map<String,Object> map);

	int upType(Map<String,Object> map);

	List<BBrandInfoEntity> typeByBrandId(Integer brandId);

	int delBrandAndType(Integer brandId);

	int delsupply(Integer brandId);

	List<BBrandVitalEntity> queryVital(Map<String,Object> map);

	Integer queryVitelTotal(Map<String,Object> map);

	/**
	 * 大分类信息
	 * @return
	 */
	List<BBrandCategoryEntity> queryAllCategory(BBrandCategoryEntity bBrandCategoryEntity);

	int updateBrandAlias(BBrandInfoEntity brandInfo);
}
